<?php

require_once("entity.php");
require_once("field.php");


class tabular extends entity {
	
	public $name;
	public $owner;
}


class dictionary extends entity {

	protected $tabulars = array();

	function __construct($name) {
		require_once($_SERVER['DOCUMENT_ROOT']."/classes/System/osmetadata.php");
		
		if (!$dictionary = $metadata->dictionaries->byname($name)) { return null;}
		$this->name = $name;
		foreach ($dictionary->fields->getall() as $metafield) {
			$field = new field();
			$field->name = $metafield->name;
			$field->beforechange = $metafield->beforechange;
			$field->afterchange = $metafield->afterchange;
			$this->addfield($field);
		}
	}

}
?>

